package com.cf.controller;

import com.cf.domain.ResponseResult;
import com.cf.domain.vo.TeamOrderVO;
import com.cf.service.IJudgesScoreService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Author lzqinga@126.com
 * @Date 2024/11/13  13:01
 */
@Controller
@RequestMapping("/judgesScore")
@RequiredArgsConstructor
public class JudgesScoreController {

    private final IJudgesScoreService judgesScoreService;

    @GetMapping("/{userId}")
    @ResponseBody
    public ResponseResult getByUserId(@PathVariable("userId") Long userId){
        List<TeamOrderVO> data = judgesScoreService.getListByUserId(userId);
        return ResponseResult.sucess(data);
    }
}
